package com.nmsl.sn.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.nmsl.sn.mapper.SnMedicalHistoryMapper;
import com.nmsl.sn.domain.SnMedicalHistory;
import com.nmsl.sn.service.ISnMedicalHistoryService;

/**
 * 病历Service业务层处理
 * 
 * @author sn
 * @date 2025-02-19
 */
@Service
public class SnMedicalHistoryServiceImpl implements ISnMedicalHistoryService 
{
    @Autowired
    private SnMedicalHistoryMapper snMedicalHistoryMapper;

    /**
     * 查询病历
     * 
     * @param id 病历主键
     * @return 病历
     */
    @Override
    public SnMedicalHistory selectSnMedicalHistoryById(Long id)
    {
        return snMedicalHistoryMapper.selectSnMedicalHistoryById(id);
    }

    /**
     * 查询病历列表
     * 
     * @param snMedicalHistory 病历
     * @return 病历
     */
    @Override
    public List<SnMedicalHistory> selectSnMedicalHistoryList(SnMedicalHistory snMedicalHistory)
    {
        return snMedicalHistoryMapper.selectSnMedicalHistoryList(snMedicalHistory);
    }

    /**
     * 新增病历
     * 
     * @param snMedicalHistory 病历
     * @return 结果
     */
    @Override
    public int insertSnMedicalHistory(SnMedicalHistory snMedicalHistory)
    {
        return snMedicalHistoryMapper.insertSnMedicalHistory(snMedicalHistory);
    }

    /**
     * 修改病历
     * 
     * @param snMedicalHistory 病历
     * @return 结果
     */
    @Override
    public int updateSnMedicalHistory(SnMedicalHistory snMedicalHistory)
    {
        return snMedicalHistoryMapper.updateSnMedicalHistory(snMedicalHistory);
    }

    /**
     * 批量删除病历
     * 
     * @param ids 需要删除的病历主键
     * @return 结果
     */
    @Override
    public int deleteSnMedicalHistoryByIds(Long[] ids)
    {
        return snMedicalHistoryMapper.deleteSnMedicalHistoryByIds(ids);
    }

    /**
     * 删除病历信息
     * 
     * @param id 病历主键
     * @return 结果
     */
    @Override
    public int deleteSnMedicalHistoryById(Long id)
    {
        return snMedicalHistoryMapper.deleteSnMedicalHistoryById(id);
    }
}
